import 'package:seedfour/app/models/case_list_entity.dart';
import 'package:seedfour/generated/json/base/json_field.dart';
import 'package:seedfour/generated/json/seal_detail_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class SealDetailEntity {
  SealDetailCommonApply? commonApply;
  List<SealApproveRecord>? approveList;
  List<SealAttachFile>? attachFiles;
  CaseInfo? caseInfo;

  SealDetailEntity();

  factory SealDetailEntity.fromJson(Map<String, dynamic> json) =>
      $SealDetailEntityFromJson(json);

  Map<String, dynamic> toJson() => $SealDetailEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SealDetailCommonApply {
  int? createdAt;
  int? updatedAt;
  String? id;
  String? uid;
  String? orgId;
  String? caseId;
  int? type;
  int? status;
  int? sealType;
  int? printNum;
  String? remark;
  String? taker;
  String? rejectRemark;
  String? completeRemark;
  String? creatorName;
  bool? isOwner;

  SealDetailCommonApply();

  factory SealDetailCommonApply.fromJson(Map<String, dynamic> json) =>
      $SealDetailCommonApplyFromJson(json);

  Map<String, dynamic> toJson() => $SealDetailCommonApplyToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SealApproveRecord {
  int? createdAt;
  int? updatedAt;
  int? id;
  String? caseId;
  String? uid;
  int? type;
  int? approve;
  String? remark;
  String? approverName;

  SealApproveRecord();

  factory SealApproveRecord.fromJson(Map<String, dynamic> json) =>
      $SealApproveRecordFromJson(json);

  Map<String, dynamic> toJson() => $SealApproveRecordToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class SealAttachFile {
  int? id;
  String? name;
  String? dname;

  SealAttachFile();

  factory SealAttachFile.fromJson(Map<String, dynamic> json) =>
      $SealAttachFileFromJson(json);

  Map<String, dynamic> toJson() => $SealAttachFileToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
